#include "dominion.h"
#include <stdio.h>
#include <assert.h>
#define NUMTEST 10
#define RDMSEED 20
#define PLAYERS 1
//This is a random test generator for Smithy card

int main () {
  struct gameState *game = newGame();
  int kingdom_cards[NUMTEST] = {adventurer, council_room, feast, gardens, mine, remodel, smithy, village, baron, great_hall}

  initializeGame(PLAYERS, kingdom_cards, RDMSEED, game); //Initialize new game state
  shuffle(PLAYERS, game); //Shuffle cards
  
  //Looked at lecture slides for examples on this random generator code
  for(n=0;n<2500;n++){
	  for(i=0;i<sizeof(struct gameState);i++){
		  ((char *)&G)[i]=floor(Random()*256);
	  }
	  p=floor(Random()*2);
	  cardEffect(smithy, 0, 0, 0, game, 0, 0);
	  checkDrawCard(p, &G);
  }

  printf("Random test for Smithy passed");
}
